package com.atguigu.product.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author polaris
 * @date 2020/12/27 10:12 下午
 */
@Configuration
@EnableTransactionManagement
@MapperScan("com.atguigu.product.dao")
public class MybatisConfig {
  @Bean
  public PaginationInterceptor paginationInterceptor() {
    PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
    paginationInterceptor.setLimit(1000);
    return paginationInterceptor;
  }
}
